'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const auth = app.middleware.auth({title:"中间件"});
  
  const { router, controller } = app;
  // router.get('/', controller.home.index);
  router.get('/',auth, controller.home.index);
  // router.get('/start',auth, controller.home.start);
  // router.get('/detail', controller.detail.index);
  router.get('/movie', controller.movie.index);

  
  router.get('/render', controller.home.render);
  //http://127.0.0.1:7001/render?apikey=eyJhbGciOiJIUzI1NiJ9.MTIzNDU2.jXGweo4iGdPngxob0efyzCoI5HMX04916NDDp7mrRms

  router.post('/getToken', controller.token.index);
  router.post('/detail',controller.detail.index);
};
